/*
 * @Author: wangming
 * @Date: 2021-07-07 14:06:41
 * @LastEditors: wangming
 * @LastEditTime: 2021-09-02 16:22:33
 * @FilePath: /hanma-application-designer-fed/src/components/monacoEditor/eventType.js
 * @Description: 
 */
export const eventType = `
interface Config {
    required: boolean, visible: boolean, disabled: boolean
}
interface Component {
    dispatch: (method: string, params: { [key: string]: any }) => {};
    setConfig: (config: Config) => {};
    getValue: () => {};
    getValues: () => {};
    setValue: (config: any) => {};
    setValues: (config: { [key: string]: any }) => {};
    reset: () => {};
    validate: () => {};
    setData: (data: { [key: string]: any }[]) => {};
    getData: (() => { [key: string]: any }[])
    reload: () => {};
    getSelected: () => ((number | string)[]);
    setSelected: (data: (number | string)[]) => {};
}
interface Modal {
    open: (options: { title: string, onOpen: (contenxt: Context) => {}, onClose: (contenxt: Context) => {} }) => void;
    close: () => void;
}
interface Router {
    push: (options: { title: string, query: { [key: string]: string } }) => {};
    back: () => {}
}
interface Context {
    getComponent: (key: string) => Component;
    getModal: (key: string) => Modal;
    getCurrentUser: () => {};
    router: Router;
    getRouterParams: () => ({ query: { [key: string]: string } })
    request: (model_key: string, business_key: string) => Promise<any>;
    moment: () => {};
    Message: () => {};
    catchMap: Object
}
const context:Context
`

export const suggestions = [
    'context.getComponent',
    'context.getModal',
    'context.getCurrentUser',
    'context.router',
    'context.getRouterParams',
    'context.request',
    'context.moment',
    'context.Message',
    'context.catchMap',
    'this.context.getComponent',
    'this.context.getModal',
    'this.context.getCurrentUser',
    'this.context.router',
    'this.context.getRouterParams',
    'this.context.request',
    'this.context.moment',
    'this.context.Message',
    'this.context.catchMap'
]